#pragma once
#include "stdafx.h"
#include "StrokeCollection.h"
#include "DynamicRenderer.h"
enum InkCanvasEditingMode
{
	None,
	Ink,
	EraseByPoint,
	EraseByStroke
};

class InkCanvas
{
public:
	InkCanvas();
	~InkCanvas();

	void Init();
	void Update();
	void Draw(sf::RenderTarget& target,sf::RenderStates& state);
	void OnTouchDown(int touchId,double touchX,double touchY);
	void OnTouchMove(int touchId, double touchX, double touchY);
	void OnTouchUp(int touchId, double touchX, double touchY);
	void Clear();
	InkCanvasEditingMode GetEditingMode()
	{
		return m_EditMode; 
	}
	void SetEditingMode(InkCanvasEditingMode icMode) 
	{ 
		m_EditMode = icMode;
	}
	void Resize()
	{

	}
	int nLineWidth{2};
	sf::Color strokeColor;
	StrokeCollection sc;
private:
	InkCanvasEditingMode m_EditMode;
	std::map<int, StylusPointCollection> mpTouchPoint;
	DynamicRenderer m_drender;
};